drivers: serial_sifive: Skip baudrate config if no input clock
authorAtish Patra <[email protected]>
Mon, 25 Feb 2019 08:15:08 +0000 (08:15 +0000)
committerAndes <[email protected]>
Wed, 27 Feb 2019 01:12:33 +0000 (09:12 +0800)
commitee0633ef8b027960bd53ab62abb6f6fc25b1c66b
tree5a0c2f82bc53413bf9a5130e2839dd4089ec4c85
parenta3682008a03c0d4a58bcf62ca1e4a37187c9a8df
drivers: serial_sifive: Skip baudrate config if no input clock

It is possible that input clock is not available because clk
device was not available and 'clock-frequency' DT property is
also not available.

In this case, instead of failing we should just skip baudrate
config by returning zero.

Signed-off-by: Atish Patra <[email protected]>
Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Alexander Graf <[email protected]>
drivers/serial/serial_sifive.c